home *** CD-ROM | disk | FTP | other *** search
- on initsw
- global gswlist
- set gswlist to "13,16,19,22,25,14,17,20,23,26,15,18,21,24,27,0"
- end
-
- on checksw
- global gswlist
- set j to 0
- set l to 0
- set i to the mouseCast
- if i > 0 then
- repeat with k = 1 to 15
- if i = integer(item k of gswlist) then
- if k < 6 then
- if the mouseDown then
- set the puppet of sprite (k + 26) to 1
- set the castNum of sprite (k + 26) to i + 2
- else
- set the puppet of sprite (k + 26) to 1
- set the castNum of sprite (k + 26) to i + 1
- end if
- set l to k + 26
- exit repeat
- next repeat
- end if
- if k < 11 then
- if the mouseDown then
- set the castNum of sprite (k + 21) to i + 1
- end if
- set l to k + 21
- exit repeat
- next repeat
- end if
- if the mouseUp then
- set j to k - 10
- set the puppet of sprite (k + 16) to 0
- end if
- set l to k + 16
- exit repeat
- end if
- end repeat
- end if
- clearsw(l)
- return j
- end
-
- on clearsw n
- repeat with i = 27 to 31
- if i <> n then
- set the puppet of sprite i to 0
- end if
- end repeat
- end
-